home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / xlib / README < prev    next >
Text File  |  1996-11-11  |  24KB  |  673 lines

  1.  
  2.              ~4Dgifts/toolbox/src/exampleCode/opengl/xlib README 
  3.  
  4.  
  5.                 THIS CODE RUNS/COMPILES ON 5.1 Irix OR LATER
  6.                 THIS CODE WILL NOT RUN ON LESS THAN 5.1 Irix
  7.  
  8.  
  9.  
  10.     This is a collection of sample OpenGL programs for those who prefer 
  11.     going the stone-knives-and-bearskins route with only Xlib rather than 
  12.     working with toolkits like Xt, Motif or the OpenGL's own libGLw.a (the
  13.     motif widget) libtk.a and/or libaux.a.
  14.  
  15.     Note that in the opengl/samples/samples subtree there are libtk/libaux 
  16.     versions of some of the straight Xlib-based programs living here.  There 
  17.     are people who prefer or need to work from the ground up.  Thus the 
  18.     justification for the existence of this "ground-floor" examples directory.
  19.  
  20.     Of special note are tprim_pup.c and zrgb_pup.c, both of which implement
  21.     a pure-Xlib version of the "IrisGL-type" pup menu capability making use of
  22.     the {pup.c,pup.h} files.  This code was ripped out of the IrixGL-X 
  23.     implementation and munged around a little, so it is exactly dopup, 
  24.     addtopup, etc. (however there *is* an extra screen & display argument to
  25.     make it work with X).  The code is not pretty, but it does work and now
  26.     can offer people an alternative to having to go with a toolbox on top of
  27.     Xlib just to get popup menus included.  See README.pup for a refresher set
  28.     of descriptions lifted from the pup menu man pages on 
  29.        long newpup(Display *dpy, int screen)
  30.        void addtopup(long pup, char *str, ...)
  31.        long defpup(Display *dpy, int screen, char *str, ...)
  32.        long dopup(long menu)
  33.        void freepup(long menu)
  34.        void setpup(long menu, long item, unsigned long arg)
  35.     as they now can be used in OpenGL-Xlib programs.
  36.  
  37.     ++> indicates new as of version 4.1
  38.     =+> indicates enhanced as of version 4.1
  39.  
  40.  
  41.     
  42. ++> aaline:     demonstrates anti-aliaed line, aliasing can be toggled, the 
  43.         line can be rotated, its width can be increased/decreased, 
  44.         and stippling can be toggled.
  45.         RGBA, singlebuffer
  46.       cmd line options:
  47.        -c       color index mode
  48.       keys:
  49.         O/o     rotate counter-clockwise
  50.         P/p     rotate clockwise
  51.     Q/q     decrement line's width
  52.     W/w     increment line's width
  53.     A/a     toggle anti-aliasing on/off (initial state: anti-aliasing ON)
  54.     L/l     toggle line stipple on/off (initial state: line-stippling OFF)
  55.     Esc     quit
  56.  
  57.  
  58. ==> bufferogl:  demonstrates switching between single and double -buffer
  59.         mode.  A useful technique for bitplane-limited machines like 
  60.         Indigo starter or the 8-bit Personal IRIS or Indy.  employs
  61.         materials/lighting, zbuffer, single/double -buffer, drawing
  62.         spheres.
  63.     RGBA, singlebuffer, doublebuffer, depthbuffer
  64.       keys:
  65.     LEFTMOUSE    switch to single buffer
  66.     MIDDLEMOUSE  switch to double buffer
  67.     RIGHTMOUSE   animate to visualize the current buffer mode
  68.         Esx     quit
  69.  
  70.  
  71. ==> cull: shows the effect of culling on an ordered set of triangles
  72.       representing all the permutations of vertex ordering for both
  73.       smooth and flat shading
  74.     RGBA, singlebuffer
  75.       keys:
  76.         0          select front face
  77.     1          select back face
  78.     2          select both front and back faces
  79.     p/P        display polygon using points
  80.     l/L        display polygon using lines
  81.     f/F        display pologon as filled
  82.     d/D        toggle cw/ccw interpretation of front face
  83.     c/C        cull current face
  84.     e/E    toggle enable/disable culling
  85.     Esc    quit
  86.  
  87.  
  88. ==> cylinder2:  demonstrates creating a GL window with an overlay window
  89.         on top of it occupying the same position.
  90.     RGBA, doublebuffer, alphablending, depthbuffer
  91.       keys:
  92.     LEFTMOUSE  drag/move cylinder
  93.     w       toggles an overlay wire frame on cylinder
  94.     t       toggles scene transparency
  95.     KeyBd   quit
  96.  
  97.  
  98. ==> dnbogl: imitation of the Dial Button Box Confidence Test in the "System"
  99.         toolchest.  two windows, 1 single 1 double -buffered, side-by-side.
  100.     CI, singlebuffer and doublebuffer
  101.       keys:
  102.     Dial Buttons  press to highlight representation in GL window
  103.         Dial Dials    turn to highlight representation in GL window
  104.     LEFTMOUSE     quit
  105.  
  106.  
  107. ==> font:  demonstrates a replaced for the IRIS GL charstr() function
  108.        RGBA, singlebuffer
  109.       keys:
  110.     KeyBd   quit
  111.  
  112.  
  113. ++> fonts:  demonstrates rendering multiple fonts, one-at-a-time.
  114.        RGBA, doublebuffer
  115.       keys:
  116.     f       step thru 4 different fonts
  117.     KeyBd   quit
  118.  
  119.  
  120. ==> glxvis: provide text of visuals information for machine being run on
  121.  
  122.  
  123. ==> intro:  standalone program listing from the glXintro man page
  124.     RGBA, singlebuffer
  125.  
  126.  
  127. ==> iobouce:  animated ball speeds up by pressing the mouse buttons
  128.     CI, doublebuffer
  129.       keys:
  130.         RIGHTMOUSE   stops disk
  131.     MIDDLEMOUSE  increases y velocity
  132.     LEFTMOUSE    increases x velocity
  133.     Esc    quit
  134.  
  135.  
  136. ++> jackobox: This program creates a nest of seven single-buffered RGB windows. 
  137.               A single OpenGL rendering context is bound to each window in turn
  138.           and a clear is done to the window (each window cleared to a 
  139.           different color).  Finally, this message is drawn using X.  If 
  140.           you can't read the message, the program didn't work.
  141.        RGBA, singlebuffer
  142.       keys:
  143.      SPACEBAR:  steps thru a "colorbase" scheme that changes each time 
  144.             in/for each window
  145.      Esc  quit
  146.  
  147.  
  148. ++> multcx:  creates two GLX contexts, and alternately draws into the same 
  149.          window with them.  written to test functioning of multiple 
  150.          contexts drawing to same window w/depth buffer
  151.        RGBA, depthbuffer
  152.       keys:
  153.      c/C  copy contexts
  154.      r/R  force "redraw" of the window
  155.      Esc  quit
  156.  
  157.      
  158. ==> overlay:  draws boxes in the overlay planes with a bouncing ball 
  159.               underneath in the GL window.
  160.         CI, doublebuffer, overlay
  161.       keys:
  162.      b    toggles bell
  163.      Esc  quit
  164.  
  165.  
  166. ++> pixmap:   draws a pixmap
  167.         RGBA or CI, singlebuffer
  168.       cmd line options:
  169.        -c    Run in color index mode
  170.       keys:
  171.      c    
  172.      p    
  173.      w    
  174.      Esc  quit
  175.  
  176.  
  177. ++> pixtest:  takes an image file as input as performs MANY pixel operations 
  178.           via keyboard keys.
  179.         RGB, doublebuffer, depthbuffer, stencilbuffer
  180.       cmd line options:
  181.        pixtest [-s] [-geometry WxH+X+Y] <filename>
  182.        -c    Run in color index mode
  183.        -s       Run in singlebuffer mode [default is doublebuffer]
  184.        -geometry WxH+X+Y   Specify window size and location
  185.       keys:
  186.      i/I  initialize window to white background
  187.      x    increment x size of image 
  188.      X    decrement x size of image 
  189.      y    increment y size of image 
  190.      Y    decrement y size of image 
  191.      LEFTARROW  move entire image left
  192.      RIGHTARROW move entire image right
  193.      UPARROW    move entire image up
  194.      DOWNARROW  move entire image down
  195.      b/B  toggle pixel transfer mode bias with
  196.           GL_RED/GREEN/BLUE_SCALE/BIAS for glPixelTransferf
  197.      m/M  toggle pixel transfer mode mapping with
  198.           GL_MAP_COLOR for glPixelTransferf 
  199.               (from the man page:  each color component is scaled by the size 
  200.            of the corresponding color-to-color map, then replaced by the 
  201.            contents of that map indexed by the scaled component.)
  202.      s/S  toggle glScissor mode to just encompass the image size and then
  203.           back to the full window size
  204.          r/R  change "Test" being performed: DRAW, COPY, or READ pixels, which
  205.           consequently invokes glDrawPixels, glCopyPixels, or glReadPixels
  206.           respectively.
  207.          t/T  change "Type" of data being defined for glDraw/ReadPixels, or 
  208.           glStencilFunc to run thru the cycle GL_UNSIGNED_BYTE, GL_BYTE, 
  209.           GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
  210.           GL_BITMAP, GL_UNSIGNED_BYTE.
  211.      f/F  change "Format" of data being defined for a MASS of functions
  212.               to run thru the cycle of GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT,
  213.           GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_RED, GL_GREEN, GL_BLUE,
  214.           GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB.
  215.      a/A  toggle alpha test on/off for glAlphaFunc(GL_GREATER, 0.5).
  216.      e/E  swap bytes from 
  217.         glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE);
  218.         glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
  219.         glPixelStorei(GL_PACK_SWAP_BYTES, GL_TRUE);
  220.         glPixelStorei(GL_PACK_LSB_FIRST, GL_FALSE);
  221.               to
  222.         glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
  223.         glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
  224.         glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE);
  225.         glPixelStorei(GL_PACK_LSB_FIRST, GL_TRUE);
  226.      w/W  modify the alignment shift from 1 to 2 to 3 bytes back to 
  227.           default 4-byte alignment with stdout messages of
  228.             (1*), Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  229.             (2*), Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  230.             (3*), Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  231.             Type: GL_UNSIGNED_BYTE, Format: GL_RGBA
  232.      d/D  toggle between immediate or display list modes
  233.      Esc  quit
  234.  
  235.  
  236. ++> readwrite:   perform read/write tests of glDrawPixels
  237.         One should see nothing change with any of these tests if opengl
  238.     is functioning properly (i.e. simply taking a black polygon with an 
  239.     alpha value of zero and adding it to the screen should not change).
  240.         RGBA or CI, singlebuffer or doublebuffer, depthbuffer, stencilbuffer
  241.       cmd line options:
  242.        -c      run in color index mode
  243.        -s      run in singlebuffer mode
  244.        -i      turn direct rendering off--go thru the X server
  245.       keys:
  246.      p/P  pixels test
  247.      b/B  blend test
  248.          d/D  enable/disable dithering
  249.      r/R  redraw    
  250.      Esc  quit
  251.  
  252.  
  253. ++> scube:  draw a lit spining cube and its shadow 
  254.         RGBA && dblbuffer or RGB && sglbuffer or CI && (dblbuffer||snglbuffer),
  255.         depthbuffer
  256.       cmd line options:
  257.        -geometry  window size and location
  258.        -c      toggle color index mode
  259.        -l      toggle lighting
  260.        -f      toggle fog
  261.        -db     toggle double buffering
  262.        -logo   toggle sgi logo for the shadow pattern
  263.        -quads  toggle use of GL_QUADS to draw the checkerboard
  264.       keys:
  265.      l/L  enable/disable lighting
  266.      f/F  enable/disable fog
  267.      1    when fog is enabled, set glFogf(GL_FOG_MODE, GL_LINEAR)
  268.      2    when fog is enabled, set glFogf(GL_FOG_MODE, GL_EXP)
  269.      3    when fog is enabled, set glFogf(GL_FOG_MODE, GL_EXP2)
  270.      Esc  quit
  271.  
  272.  
  273. ==> skeeter:  illustrates overlay/popup plane usage, display lists, two-sided
  274.               lighting, alpha blending transparency.
  275.         RGBA, doublebuffer, alphablending, depthbuffer
  276.       keys:
  277.          LEFTMOUSE  drags the `skeeter' around in the overlay/popup planes
  278.          SPACEBAR   CD drops from the sky
  279.          Esc        quit
  280.  
  281.  
  282. ==> sphere:  draws a wire-framed sphere and exits on any keypress
  283.     RGBA, singlebuffer
  284.       keys:
  285.     KeyBd   quit
  286.  
  287.  
  288. ++> spots:  demonstrate implementation of spotlights "swinging about"
  289.         RGBA, doublebuffer
  290.       cmd line options:
  291.        -geometry Specify size and position WxH+X+Y
  292.        -lm       Toggle lighting(SPECULAR and AMBIENT are not the same
  293.       keys:
  294.          Esc        quit
  295.      
  296.  
  297. ==> tabletogl: "line drawing" tablet demo
  298.     CI, singlebuffer
  299.       keys:
  300.     tablet pen or puck  draws lines as long as stylus is pressed down
  301.     LEFTMOUSE           quit
  302.  
  303.  
  304. ++> tcilight:  test color index lighting
  305.         CI, doublebuffer, depthbuffer
  306.       cmd line options:
  307.        -geometry (Specify size and position:) WxH+X+Y
  308.       keys:
  309.          o/O  toggle between checkboard or cylinder object
  310.          l/L  toggle lighting
  311.          t/T  toggle two-sided lighting
  312.          k/K  toggle local light
  313.          v/V  toggle local viewer
  314.          p/P  toggle spotlight
  315.          n/N  toggle attenuation
  316.          a    decrease ambient color by changing ambient index
  317.          A    increase ambient color by changing ambient index
  318.          d    decrease diffuse color by changing diffuse index
  319.          D    increase diffuse color by changing diffuse index
  320.          s    decrease specular color by changing specular index
  321.          S    increase specular color by changing specular index
  322.          MOUSEBUTTON  when pressed rotate object about its center
  323.          Esc        quit
  324.  
  325.  
  326. ==> tdepth: uses the depth buffer test
  327.     RGBA, singlebuffer, depthbuffer
  328.       keys:
  329.     a/A       toggles aliasing/antialiasing
  330.     s/S       toggles stipple/no stipple
  331.     Esc     quit
  332.  
  333.  
  334. ++> tesstest:  glu tessellator test
  335.       cmd line options:
  336.        -c      run in color index mode
  337.        -s      run in singlebuffer mode
  338.       keys:
  339.      c  create a new contour.  (see note below)
  340.      d  delete a vertex.
  341.      t  tessellate and draw the polygon.
  342.      s  show the tessellation.
  343.      e  draw the polygon in Polymode(GL_LINE) with edge flags.
  344.      LEFTMOUSE   moves an existent vertex
  345.      MIDDLEMOUSE inserts a vertex into a contour
  346.          Esc        quit
  347.       Note : you can create polygon with holes by creating a new
  348.              contour inside the outer contour. pressing c key
  349.              creates vertices for the new countour which can
  350.              be connected by clicking and dragging the middle mouse.
  351.  
  352.  
  353. ++> tfog:  test fog functionality
  354.     RGBA or CI, singlebuffer, depthbuffer
  355.       cmd line options:
  356.        -c    Run in color index mode
  357.       keys:
  358.      a/A       toggles aliasing/antialiasing
  359.      e/E    toggles feedback mode
  360.      f/F    toggles fog mode
  361.      s/S       toggles stipple/no stipple
  362.      t/T    toggles enabling/disabling stencil test
  363.      m/M    toggles smooth shading on/off
  364.          Esc    quit
  365.  
  366.  
  367. ++> tline: line test
  368.     RGBA || CI, singlebuffer || doublebuffer, depthbuffer, stencilbuffer,
  369.       cmd line options:
  370.        -c    color index mode
  371.        -s    single buffer mode
  372.        -geometry  specify window size and location
  373.       keys:
  374.     y/Y     toggle blending
  375.     g/G     toggle rotating "lines as rays of the sun" behind the grid
  376.     q/Q     enable GL_LINE_STIPPLE
  377.     w/W     disable GL_LINE_STIPPLE
  378.     e/E     enable GL_LINE_SMOOTH w/glHint(GL_LINE_SMOOTH_HINT, GL_NICEST)
  379.     r/R      "  GL_LINE_SMOOTH w/glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE)
  380.     t/T     disable GL_LINE_SMOOTH
  381.     a/A     if GL_LINE_SMOOTH enabled (e/E || r/R), 
  382.             increment line width by 0.25 per keypress
  383.         else if GL_LINE_SMOOTH disabled (t/T), 
  384.             increment line width by 1.0 per keypress
  385.     z/Z     if GL_LINE_SMOOTH enabled (e/E || r/R), 
  386.             decrement line width by 0.25 per keypress
  387.         else if GL_LINE_SMOOTH disabled (t/T), 
  388.             decrement line width by 1.0 per keypress
  389.     d/D     toggle dithering
  390.     f/F     toggle line fragmentation
  391.     s/S     toggle flat/smooth shading
  392.     x/X     toggle stenciling on/off
  393.     c/C     toggle depth testing off/on
  394.     v/V     toggle glDepthFunc(GL_ALWAYS) or glDepthFunc(GL_LESS)
  395.     b/B     toggle "Depth writes masked for horizontal lines"
  396.         or "Depth writes not masked"
  397.     Esc    quit
  398.  
  399.  
  400. =+> tlogo: renders the SGI cube logo using a variety of texturing, lighting
  401.        techniques and models.
  402.     RGBA || CI, singlebuffer || doublebuffer, depthbuffer, stencilbuffer,
  403.     RED accumulation buffer
  404.       cmd line options:
  405.        -c    color index mode
  406.        -s    single buffer mode
  407.        -f    choose a new X font name to use
  408.        -geometry  specify window size and location
  409.       keys:
  410.     Esc    quit
  411.     space    anitmation toggle
  412.     ?    show frames/second
  413.         LEFT    rotate to the left
  414.     RIGHT    rotate to the right
  415.     UP      move clipping plane toward viewer
  416.     DOWN    move clipping plane away from viewer
  417.     z    zoom in logo
  418.     Z    zoom out logo 
  419.     1    draw filled polygons
  420.     2       draw only the vertices of the polygons
  421.     3       draw only the outline of the polygons
  422.     p/P     cycle current face mode BACK, FRONT, FRONTANDBACK
  423.     4    if highest level of antialiasing is avaialbe, use it
  424.     5    enable alpha test (function is source alpha, destintation is 1)
  425.     6    enable the depth test
  426.     7    stipple the image
  427.     8    disable the stipple
  428.     9    flat shade the polygons
  429.     0    gouraud shade the polygons
  430.     Q    enable culling of front-and-back facing polygons
  431.     q    disable culling
  432.     w/W    cull the front facing polygons
  433.     e/E    cull the back facing polygons
  434.     r/R    use the cw rule to determine front facing
  435.     t/T    use the ccw rule to determine front facing
  436.     y/Y    change the stippling to least significant bit last
  437.     u/U    change the stippling to least significant bit first
  438.     a/A    use a brick like pattern as the texture image
  439.     s/S    use a black and white checkerboard as the texture image
  440.     d/D    disable texturing
  441.     f/F    change the texturing environment function to decal
  442.     g/G    change the texturing environment function to modulate
  443.     h/H    toggle dithering (default is on)
  444.     l/L    toggle lighting
  445.     k/K     toggle twosided lighting 
  446.     i/I    toggle fog
  447.     j/J    toggle depth testing
  448.     x/X    toggle clip plane on/off
  449.     c/C     toggle capping algorithm
  450.     v/V     toggle jittering (accumulation buffering anti-aliasing)
  451.     b/B     toggle motion blur
  452.     n/N     toggle feedback mode test
  453.     M       increment viewport decimation
  454.     m       decrement viewport decimation
  455.  
  456.  
  457.  
  458. ++> toverlay:  test overlay plane rendering
  459.       cmd line options:
  460.         -nm       just display normal plane window
  461.         -ov       just display overlay plane window
  462.         -m mode   display both windows according to mode:
  463.                    0  overlay is child of normal (default)
  464.                    1  both are children of root
  465.                    2  both are children of a child of root
  466.         -bindov   bind opengl to overlay window first
  467.         -gl       toggle opengl rendering
  468.         -a        toggle animation
  469.  
  470.  
  471. =+> tprim: draws all of the primitives ( from left to right, bottom to top )
  472.        points, lines, line strip, a line loop, bitmaps, triangles, 
  473.        triangle strips, fanned triangles, a rectangle, a polygon, two
  474.        separate quads, and a quad strip.  Draws them using flat shading,
  475.        Gouraud shading and draws them filled or outlined.
  476.     RGBA || CI, singlebuffer
  477.       cmd line options:
  478.        -c    color index mode
  479.       keys:
  480.     f/F    render using flat shading
  481.     s/S    render using smooth shading
  482.     p/P    render polygon in filled mode
  483.     l/L    render polygon in line mode
  484.     c/C     rotates color mask
  485.     b/B     toggle which buffer is currently drawn to: [GL_NONE,GL_FRONT]
  486.     r/R     toggle drawing the next vertex randomly either using
  487.         glVertex2f(x,y), glVertex3f(x,y,0), or glVertex4f(x,y,0,1).
  488.     q/Q     toggle switching to a constrained clipped area or not
  489.     2       toggle switching to the fastest 2D clipping possible
  490.     Esc    quit
  491.  
  492.  
  493. ++> tprim_pup:  resuscitated "iris GL-type" pup menu capability added to the
  494.        tprim prog which draws all of the primitives (left to right, bottom 
  495.        to top ) points, lines, line strip, a line loop, bitmaps, triangles, 
  496.        triangle strips, fanned triangles, a rectangle, a polygon, two
  497.        separate quads, and a quad strip.  Draws them using flat shading,
  498.        Gouraud shading and draws them filled or outlined.
  499.     RGBA || CI, singlebuffer
  500.       cmd line options:
  501.        -c    color index mode
  502.       keys:
  503.     f/F    render using flat shading
  504.     s/S    render using smooth shading
  505.     p/P    render polygon in filled mode
  506.     l/L    render polygon in line mode
  507.     c/C     rotates color mask
  508.     RIGHTMOUSE    invokes "iris GL-type" pop-up menu
  509.     Esc    quit
  510.  
  511.  
  512. ==> tri: render triangles as points, lines or filled and rotate or translate
  513.      with [keypad] arrow keys.
  514.     RGBA, singlebuffer
  515.       keys:
  516.     p/P    render polygon in point mode
  517.     l/L    render polygon in line mode
  518.     f/F    render polygon in fill mode
  519.     LEFT    translate along -x
  520.     RIGHT    translate along +x
  521.     UP    translate along +y
  522.     DOWN    translate along -y
  523.     KeyPadLEFT    rotate around z
  524.     KeyPadRIGHT    rotate around z
  525.     KeyPadUP    rotate around x
  526.     KeyPadDOWN    rotate around x
  527.     Esc        quit
  528.  
  529.  
  530. ==> tri2: render triangles as points, lines or filled inside a larger disk
  531.     with a hole in its center that these triangles get drawn into, and 
  532.     rotate or translate with [keypad] arrow keys.
  533.     RGBA, singlebuffer
  534.       keys:
  535.         p/P     render polygon in point mode
  536.         l/L     render polygon in line mode
  537.         f/F     render polygon in fill mode
  538.         LEFT    translate along -x
  539.         RIGHT   translate along +x
  540.         UP      translate along +y
  541.         DOWN    translate along -y
  542.         KeyPadLEFT      rotate around z
  543.         KeyPadRIGHT     rotate around z
  544.         KeyPadUP        rotate around x
  545.         KeyPadDOWN      rotate around x
  546.         Esc             quit
  547.  
  548.  
  549. ==> ttri: examines the clipping of a triangle using clip planes. 
  550.     RGBA, doublebuffer
  551.       keys:
  552.     LEFT    rotate 1/2 degree around z-axis ccw
  553.     RIGHT    rotate 1/2 degree around z-axis cw
  554.     UP    scale triangle smaller by a factor of .75
  555.     DOWN    scale triangle larger by a factor of 1.5
  556.     p/P     render polygon in point mode
  557.         l/L     render polygon in line mode
  558.         f/F     render polygon in fill mode
  559.     1    render the vertices as a polygon
  560.     2    render the vertices as a line loop
  561.     3    render the vertices as points
  562.     a/A    0 degree rotation around the z axis (default..original position)
  563.     b/B    90 degrees more rotation cw around the z axis
  564.     c/C    180 degrees more rotation cw around the z axis
  565.     d/D     270 degrees more rotation cw around the z axis
  566.     v/V    toggle show vertices (default is true)
  567.     s/S    render with gouraud shading
  568.     t/T    render with flat shading
  569.     h/H    toggle hide bottom (default is true)
  570.     o/O    toggle outlining
  571.     m/M    toggle dithering
  572.     7    toggle culling (default is false)
  573.     8    toggle winding (default is false)
  574.     9    toggle face (default is false - back face is culled)
  575.     q/Q    enable blending
  576.     w/W    disable blending
  577.     Esc    quit
  578.  
  579.  
  580. =+> tvorder:  draw 2-sided lit points, lines or filled polygons--all in quad 
  581.           strip mode--and each time read back some pixels from the middle 
  582.           of the window.
  583.     RGBA, singlebuffer
  584.       cmd line options:
  585.        -u  Render to unmapped window
  586.       keys:
  587.     p/P     render as points
  588.     l/L     render as lines
  589.     f/F     render as filled
  590.     Esc    quit
  591.  
  592.  
  593. =+> twave: wave animation of mesh with control over rendering options
  594.     RGBA, singlebuffer, depthbuffer, stencilbuffer ||
  595.     RGBA, doublebuffer, depthbuffer, stencilbuffer ||
  596.     CI, singlebuffer, depthbuffer, stencilbuffer   ||
  597.     CI, doublebuffer, depthbuffer, stencilbuffer   ||
  598.       cmd line options:
  599.        twave [-g width height] [-f frames] [-c] [-s] [-b checker size]
  600.              [-h height] [-geometry WxH+X+Y] [-a]
  601.        -g    Specify grid size  (default is 10 by 10)
  602.        -f    Specify number of frames in a full cycle (default is 10)
  603.        -c    Run in color index mode
  604.        -s    Run in single buffered mode
  605.        -b    Specify size of checker on checker board (default is 2)
  606.        -h    Specify the height of the wave (default is 0.2)
  607.        -a       Don't start off animating
  608.        -geometry  Specify window size and location
  609.       keys:
  610.     c/C    cycle texturing modes
  611.     s/S    toggle flat/smooth shading
  612.     l/L    toggle lighting on/off
  613.     d/D    toggle depth testing on/off
  614.     o/O     toggle overstrike mode, use of stencil
  615.     f/F     toggle fog (currently not working)
  616.     space    halt motion
  617.     n/N    enable motion
  618.     a/A    enable spinning
  619.     Esc     quit
  620.  
  621.  
  622. ++> wind2:  simple multi-context abuse program:  drawing with one context 
  623.         into two windows
  624.     RGBA || CI, singlebuffer || doublebuffer
  625.       cmd line options:
  626.        -c    color index mode
  627.        -s    single buffer mode
  628.       keys:
  629.     Esc    quit
  630.  
  631.  
  632. ++> wind3:  simple multi-context abuse program:  drawing with two contexts
  633.         into three windows
  634.     RGBA || CI, singlebuffer || doublebuffer
  635.       cmd line options:
  636.        -c    color index mode
  637.        -s    single buffer mode
  638.       keys:
  639.     Esc    quit
  640.  
  641.  
  642. ++> xswap:  test buffer swapping mixing X and OpenGL
  643.     RGBA || CI, doublebuffer
  644.       cmd line options:
  645.        -c    color index mode
  646.       keys:
  647.     f       set the draw buffer to be GL_FRONT
  648.     b       set the draw buffer to be GL_BACK
  649.     g       toggle drawing the font in openGL (glCallLists) or not 
  650.     x       toggle drawing the font in X (DrawXFont) or not
  651.         r       force a "REDRAW" event of the entire window
  652.     s       swap the colors of the FRONT and BACK buffers
  653.     Esc    quit
  654.  
  655.  
  656. ==> zrgb:  depthbuffered, intersecting polygons movable with mouse
  657.        (openGL version of ~4Dgifts/examples/grafix/zrgb.c)
  658.     RGBA, doublebuffer, depthbuffer
  659.       keys:
  660.     LEFTMOUSE    rotate polygons
  661.     Esc    quit
  662.  
  663.  
  664. ++> zrgb_pup:  resuscitated "iris GL-type" pup menu capability added to the
  665.        the zrgb.c prog including  depthbuffered, intersecting polygons 
  666.        movable with mouse functionality.
  667.        (openGL version of ~4Dgifts/examples/grafix/zrgbmenu.c)
  668.     RGBA, doublebuffer, depthbuffer
  669.       keys:
  670.     LEFTMOUSE    rotate polygons
  671.     RIGHTMOUSE    invokes "iris GL-type" pop-up menu
  672.     Esc    quit
  673.